<template>
  <div class="user-warp">
    <player-info :playInfo="playerInfo.anchor" :address="playerInfo.living.address"></player-info>
    <div class="user-bg previewBg"></div>
    <div class="content">{{formatDate(playerInfo.living.startDate)}} 开播</div>
  </div>

</template>

<script>
  import util from '../common/util.js';
  import PlayerInfo from './common/PlayerInfo.vue';
  export default {
    data () {
      return {
        playerInfo: {
          anchor: {},
          living: {}
        },
        id: this.$route.query.id
      }
    },
    props: {

    },
    components: {
      PlayerInfo
    },
    computed: {},
    beforeMount(){

    },
    mounted(){
      this.getLivingInfo();


    },
    activated(){

    },
    methods: {
      formatDate: util.formatDate1,

      /**
       * 获取直播信息
       */
      getLivingInfo() {
        this.httpGet(this.API.livingInfo, {id: this.id}).then((res) => {
          if (res) {
            this.playerInfo = res.data;
          }
        })
      }
    }
  }
</script>

<style lang="scss" scoped></style>
